package com.ctshk.rpc.workflow.req;

import com.ctshk.common.req.DepartmentData;
import com.ctshk.common.req.MainData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 审批配置
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-25
 */
@Data
@ApiModel(description="审批配置")
public class ApprovalSettingReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "审批模板id(修改时必填)")
    private Long id;

    @ApiModelProperty(value = "业务类型", required = true)
    private Integer businessType;

    @ApiModelProperty(value = "审批类型", required = true)
    private Integer approvalType;

    @NotBlank(message = "请输入流程名称")
    @ApiModelProperty(value = "流程名称", required = true)
    private String name;

    @ApiModelProperty(value = "是否动态设置审批人")
    private Boolean isDynamic;

    @ApiModelProperty(value = "自定义人员范围数组")
    private List<DepartmentData> employees;

    @ApiModelProperty(value = "自定义部门范围数组")
    private List<DepartmentData> depts;

    @Valid
    @ApiModelProperty(value = "流程步骤", required = true)
    private List<ApprovalSettingStepReq> steps;
}
